package com.koron.css2.baseConfig.impl;

import com.koron.css2.clientCenter.bean.CtmInfoBean;
import com.koron.css2.clientCenter.bean.UserBean;
import com.koron.css2.clientCenter.mapper.CtmInfoMapper;
import com.koron.css2.clientCenter.mapper.UserInfoMapper;
import org.koron.ebs.mybatis.SessionFactory;
import org.koron.ebs.mybatis.TaskAnnotation;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.HashMap;

@Service
public class ContractTemplateService {
	@TaskAnnotation("getPrintData")
	public HashMap getPrintData(SessionFactory sessionFactory, String userNo) {
		HashMap<String, String> m =  new HashMap<String, String>();
		//获取用户信息
		UserInfoMapper mapper = sessionFactory.getMapper(UserInfoMapper.class);
		UserBean user = mapper.getUserInfoByUserNo(userNo, UserBean.USER);// 获取用户信息
		
		ArrayList<HashMap<String, String>> data = new ArrayList<HashMap<String,String>>();
		CtmInfoMapper ctmMapper = sessionFactory.getMapper(CtmInfoMapper.class);

		CtmInfoBean ctmInfo = ctmMapper.getCtmInfoByCtmNo(user.getCtmNo(), CtmInfoBean.CTM);// 获取客服信息
		m.put("zb_hm", userNo);
		return m;
	}
}
